﻿using System;

using System.Collections.Generic;
using System.Text;

namespace Acid.Graphics
{
    /// <summary>
    /// <para>Vertex Element</para>
    /// <para>Describes a Vertex Element within a Sequential Vertex Structure.</para>
    /// </summary>
    public class VertexElement
    {
        private ElementBinding elementBinding;
        private ElementType elementType;
        private int typeCount;
        private int stride;
        private int ordinal;

        public VertexElement(ElementBinding elementBinding, ElementType elementType, int typeCount, int stride, int ordinal)
        {
            this.elementBinding = elementBinding;
            this.elementType = elementType;
            this.typeCount = typeCount;
            this.stride = stride;
            this.ordinal = ordinal;
        }

        public ElementBinding ElementBinding
        {
            get { return this.elementBinding; }
        }

        public ElementType ElementType
        {
            get { return this.elementType; }
        }

        public int TypeCount
        {
            get { return this.typeCount; }
        }

        public int Stride
        {
            get { return this.stride; }
        }

        public int Ordinal
        {
            get { return this.ordinal; }
        }
    }

    /// <summary>
    /// <para>Vertex Declaration</para>
    /// <para>Describes a Vertex</para>
    /// </summary>
    public class VertexDeclaration
    {
        private List<VertexElement> elements;

        public VertexDeclaration(VertexElement[] elements)
        {
            this.elements = new List<VertexElement>();

            this.elements.AddRange(elements);
        }

        public List<VertexElement> Elements
        {
            get { return this.elements; }
        }

    }

}
